/** @type {import('next').NextConfig} */
const withPlugins = require("next-compose-plugins");
const withLess = require("next-with-less");
const withTM = require('next-transpile-modules')([
  'antd-mobile',
]);

module.exports = async (phase) => {
  const nextConfig = {
    reactStrictMode: true,
    eslint: {
      ignoreDuringBuilds: true,
    },
    compress: false,
  };
  const defaultConfig = {}
  return withPlugins([
    [withLess, {
      lessLoaderOptions: {
        lessOptions: {
          modifyVars: {
            'primary-color': '#49AA25',
          },
          javascriptEnabled: true,
        }
      },
    }],
    [withTM, {}]
  ], nextConfig)(phase, { defaultConfig });
}